﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using LINQtoLDAPDemo_Model;

namespace LINQtoLDAPDemo_Setup
{
    partial class Employee
    {
        public User ToUser()
        {
            User employeeUser = new User();

            employeeUser.EmployeeID = this.EmployeeID;
            employeeUser.LastName = this.LastName;
            employeeUser.FirstName = this.FirstName;
            employeeUser.Notes = this.Notes;
            employeeUser.HomePhone = this.HomePhone;
            employeeUser.Title = this.Title;
            employeeUser.TitleOfCourtesy = this.TitleOfCourtesy;
            employeeUser.DisplayName = string.Format("{0} {1}", this.FirstName, this.LastName);

            return employeeUser;
        }
    }
}
